//游戏交互//////////////////////////////////////////////////////////////////////////////////////
//角色战斗---------------------------------
function playerFightBegin(startRoleId,endRoleId){
	alert(startRoleId);
	alert(endRoleId);
	window.localStorage.setItem('start_role_id', startRoleId);//发起人
	window.localStorage.setItem('end_role_id', endRoleId);//攻击目标
	
	//重新加载
	document.getElementById('playerFightIFrame').contentWindow.location.reload(true);
	$('#playerFightDiv').removeClass('dn');
	$('#mapBackgroundDiv').addClass('dn');
}
function playerFightOver(){
	window.localStorage.setItem('start_role_id', '');//发起人
	window.localStorage.setItem('end_role_id', '');//攻击目标
	
	//初始化
	$('#playerFightDiv').addClass('dn');
	$('#mapBackgroundDiv').removeClass('dn');
}

//查看游戏角色---------------------------------
function showPlayer(roleId){
	window.localStorage.setItem('look_player_role_id', roleId);
	showPlayerActionDiv(10);
}

///////////////////////////////////////////////////////////////////////////////////////////////
//显示用户交互页面信息
function showPlayerActionDiv(type){
	var srcUrl;
	if(type==1){//世界地图
		srcUrl = "/boxy/game_map.html";
	}else if(type==10){//个人信息
		srcUrl = "/boxy/player_look.html";
	}else if(type==20){//技能信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==30){//任务信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==40){//装备信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==50){//道具信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==60){//市场信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==70){//工会信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==80){//部落信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==90){//国家信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==100){//庄园信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==200){//宠物信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==300){//好友信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==500){//福利信息
		srcUrl = "/boxy/player_action.html";
	}else if(type==999){//刷新
		//重新加载
		document.getElementById('playerActionIFrame').contentWindow.location.reload(true);
		return;
	}else{//关闭
		//nothing;
	}
	
	if(checkEmpty(srcUrl)){
		$('#playerActionDiv').addClass('dn');
	}else{
		document.getElementById('playerActionIFrame').src = srcUrl;
		$('#playerActionDiv').removeClass('dn');
	}
}

//关闭用户交互页面信息
function closePlayerRoleInfoDiv(){
	showPlayerRoleInfoDiv(9999);
}
///////////////////////////////////////////////////////////////////////////////////////////////
